/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.cesupa.cabcc.sudi;

import br.cesupa.cabcc.dao.CargoDAO;
import br.cesupa.cabcc.entity.Cargo;
import java.util.List;

/**
 *
 * @author yuri
 */
public class CargoSUDI extends GenericSUDI<Cargo> implements CargoDAO {

    public Cargo getById(Integer id) {
        return (Cargo) super.executeNamedQueryObject("Cargo.findById", "id", id);
    }

    public List<Cargo> getLikeNome(String nome) {
        return super.executeNamedQueryList("Cargo.findLikeNome", "nome", "%"+nome+"%");
    }

    public List<Cargo> getLikeFuncao(String funcao) {
        return super.executeNamedQueryList("Cargo.findLikeFuncao", "funcao", "%"+funcao+"%");
    }

    public Cargo getByNome(String nome) {
        return (Cargo) super.executeNamedQueryObject("Cargo.findByNome", "nome", nome);
    }

}
